
Type ColourValue
	Field r:Float
	Field g:Float
	Field b:Float
	Field a:Float
	
	Function Create:ColourValue(r:Float, g:Float, b:Float, a:Float)
		Local cv:ColourValue = New ColourValue
		cv.r	= r
		cv.g	= g
		cv.b	= b
		cv.a	= a
		
		Return cv
	End Function
	
	Method Set(r:Float, g:Float, b:Float, a:Float = 1.0)
		Self.r	= r
		Self.g	= g
		Self.b	= b
		self.a	= a
	End Method
	
	Method fromC(c:Byte ptr)
		Self.r = Float ptr(c)[0]
		Self.g = Float ptr(c)[1]
		Self.b = Float ptr(c)[2]
		Self.a = Float ptr(c)[3]
	End Method
	
	Method toC:Byte ptr()
		Return VarPtr(Self.r)
	End Method
	
	Function WHITE:ColourValue()
		return ColourValue.Create(1.0, 1.0, 1.0, 1.0)
	End Function
End Type